package com.yitao.cms.model.operationUser;

import com.skipper.base.data.domain.BaseEntity;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
 * @Author: Tqq
 * @Date: 2018/12/24 9:26
 */
@Data
@Entity
@Table(name="t_operation_permission")
public class OperationPermissionModel extends BaseEntity {

    private static final long serialVersionUID = 6912339069440149112L;

    /**
     *  id
     *  @mbggenerated
     */
    @Id
    @Column(name = "id", columnDefinition = "BIGINT")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     *  资源名称
     *  @mbggenerated
     */
    private String permissionName;

    /**
     *  路由
     *  @mbggenerated
     */
    private String url;

    /**
     *  资源类型(0:menu 1:button)
     *  @mbggenerated
     */
    private Integer resourceType;

    /**
     *  权限字符串，menu例子：role:*，button例子：role:create，role:update，role:delete，role:view
     *  @mbggenerated
     */
    private String perms;

    /**
     *  父id
     *  @mbggenerated
     */
    private Long parentId;

    /**
     *  状态 (1:有效 0:无效)
     *  @mbggenerated
     */
    private Integer state;

    /**
     *  创建时间
     *  @mbggenerated
     */
    private Date createTime;


    /**
     *  创建人
     *  @mbggenerated
     */
    private Long createBy;


    /**
     *  图标
     *  @mbggenerated
     */
    private String iconCode;


    /**
     *  路径 格式：/根节点id/一级节点id/二级节点id/三级节点id/当前节点/
     *  @mbggenerated
     */
    private String path;


    /**
     *  最后更新人
     *  @mbggenerated
     */
    private Long lastUpdateBy;


    /**
     *  最后修改时间
     *  @mbggenerated
     */
    private Date lastUpdateTime;


    /**
     *  是否删除(0:否 1:是)
     *  @mbggenerated
     */
    private Integer isDelete;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 菜单类型（0.父菜单；1.子菜单）
     */
    private Integer pathType;


}
